&ANALYZE-SUSPEND _VERSION-NUMBER AB_v9r12 GUI adm2
&ANALYZE-RESUME
&Scoped-define WINDOW-NAME CURRENT-WINDOW

/* Temp-Table and Buffer definitions                                    */
DEFINE TEMP-TABLE ab_unmap
       FIELD alang AS CHARACTER FORMAT "X(256)":U 
       FIELD bouton1 AS CHARACTER FORMAT "X(256)":U 
       FIELD Err_pwd AS CHARACTER FORMAT "X(256)":U 
       FIELD err_pwda AS CHARACTER FORMAT "X(256)":U 
       FIELD lab-cli AS CHARACTER FORMAT "X(256)":U 
       FIELD label1 AS CHARACTER FORMAT "X(256)":U 
       FIELD label2 AS CHARACTER FORMAT "X(256)":U 
       FIELD label3 AS CHARACTER FORMAT "X(256)":U 
       FIELD label4 AS CHARACTER FORMAT "X(256)":U 
       FIELD login AS CHARACTER FORMAT "X(256)":U 
       FIELD T0 AS CHARACTER FORMAT "X(256)":U 
       FIELD T1 AS CHARACTER FORMAT "X(256)":U 
       FIELD T2 AS CHARACTER FORMAT "X(256)":U .


&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS w-html 
/*------------------------------------------------------------------------

  File: 

  Description: 

  Input Parameters:
      <none>

  Output Parameters:
      <none>

  Author: 

  Created: 

------------------------------------------------------------------------*/
/*           This .W file was created with AppBuilder.                  */
/*----------------------------------------------------------------------*/

/* Create an unnamed pool to store all the widgets created 
     by this procedure. This is a good default which assures
     that this procedure's triggers and internal procedures 
     will execute in this procedure's storage, and that proper
     cleanup will occur on deletion of the procedure. */
CREATE WIDGET-POOL.

/* ***************************  Definitions  ************************** */

/* Preprocessor Definitions ---                                         */

/* Parameters Definitions ---                                           */

/* Local Variable Definitions ---                                       */

DEF            VAR buf-noadr       LIKE doce.noadrf                NO-UNDO.
DEF            VAR buf-csmt        LIKE doce.csmtf                 NO-UNDO.
DEF            VAR a-lang          AS    INTEGER                   NO-UNDO.
DEF            VAR i               AS    INTEGER                   NO-UNDO.
DEF            VAR flag-post       AS    INTEGER                   NO-UNDO.
DEF            VAR buf-suiv        AS    CHARACTER                 NO-UNDO.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 

/* ********************  Preprocessor Definitions  ******************** */

&Scoped-define PROCEDURE-TYPE Web-Object
&Scoped-define DB-AWARE no

&Scoped-define WEB-FILE modpwd.htm

/* Name of first Frame and/or Browse and/or first Query                 */
&Scoped-define FRAME-NAME Web-Frame

/* Standard List Definitions                                            */
&Scoped-Define ENABLED-OBJECTS ab_unmap.alang ab_unmap.lab-cli ~
ab_unmap.login ab_unmap.bouton1 ab_unmap.err_pwda ab_unmap.label4 ~
ab_unmap.T0 ab_unmap.Err_pwd ab_unmap.label1 ab_unmap.label2 ~
ab_unmap.label3 ab_unmap.T1 ab_unmap.T2 
&Scoped-Define DISPLAYED-OBJECTS ab_unmap.alang ab_unmap.lab-cli ~
ab_unmap.login ab_unmap.bouton1 ab_unmap.err_pwda ab_unmap.label4 ~
ab_unmap.T0 ab_unmap.Err_pwd ab_unmap.label1 ab_unmap.label2 ~
ab_unmap.label3 ab_unmap.T1 ab_unmap.T2 

/* Custom List Definitions                                              */
/* List-1,List-2,List-3,List-4,List-5,List-6                            */

/* _UIB-PREPROCESSOR-BLOCK-END */
&ANALYZE-RESUME



/* ***********************  Control Definitions  ********************** */


/* Definitions of the field level widgets                               */

/* ************************  Frame Definitions  *********************** */

DEFINE FRAME Web-Frame
     ab_unmap.alang AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.lab-cli AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.login AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.bouton1 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.err_pwda AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.label4 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.T0 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.Err_pwd AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.label1 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.label2 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.label3 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.T1 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
     ab_unmap.T2 AT ROW 1 COL 1 HELP
          "" NO-LABEL FORMAT "X(256)":U
          VIEW-AS FILL-IN 
          SIZE 20 BY 1
    WITH 1 DOWN KEEP-TAB-ORDER OVERLAY 
         SIDE-LABELS 
         AT COL 1 ROW 1
         SIZE 60.6 BY 14.14.


/* *********************** Procedure Settings ************************ */

&ANALYZE-SUSPEND _PROCEDURE-SETTINGS
/* Settings for THIS-PROCEDURE
   Type: Web-Object
   Allow: Query
   Frames: 1
   Add Fields to: Neither
   Editing: Special-Events-Only
   Events: web.output,web.input
   Other Settings: COMPILE
   Temp-Tables and Buffers:
      TABLE: ab_unmap W "?" ?  
      ADDITIONAL-FIELDS:
          FIELD alang AS CHARACTER FORMAT "X(256)":U 
          FIELD bouton1 AS CHARACTER FORMAT "X(256)":U 
          FIELD Err_pwd AS CHARACTER FORMAT "X(256)":U 
          FIELD err_pwda AS CHARACTER FORMAT "X(256)":U 
          FIELD lab-cli AS CHARACTER FORMAT "X(256)":U 
          FIELD label1 AS CHARACTER FORMAT "X(256)":U 
          FIELD label2 AS CHARACTER FORMAT "X(256)":U 
          FIELD label3 AS CHARACTER FORMAT "X(256)":U 
          FIELD label4 AS CHARACTER FORMAT "X(256)":U 
          FIELD login AS CHARACTER FORMAT "X(256)":U 
          FIELD T0 AS CHARACTER FORMAT "X(256)":U 
          FIELD T1 AS CHARACTER FORMAT "X(256)":U 
          FIELD T2 AS CHARACTER FORMAT "X(256)":U 
      END-FIELDS.
   END-TABLES.
 */
&ANALYZE-RESUME _END-PROCEDURE-SETTINGS

/* *************************  Create Window  ************************** */

&ANALYZE-SUSPEND _CREATE-WINDOW
/* DESIGN Window definition (used by the UIB) 
  CREATE WINDOW w-html ASSIGN
         HEIGHT             = 14.14
         WIDTH              = 60.6.
/* END WINDOW DEFINITION */
                                                                        */
&ANALYZE-RESUME

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB w-html 
/* *********************** Included-Libraries ************************* */

{src/web2/html-map.i}

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME




/* ***********  Runtime Attributes and AppBuilder Settings  *********** */

&ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES
/* SETTINGS FOR WINDOW w-html
  VISIBLE,,RUN-PERSISTENT                                               */
/* SETTINGS FOR FRAME Web-Frame
   UNDERLINE                                                            */
/* SETTINGS FOR FILL-IN ab_unmap.alang IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.bouton1 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.Err_pwd IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.err_pwda IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.lab-cli IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.label1 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.label2 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.label3 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.label4 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.login IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.T0 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.T1 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* SETTINGS FOR FILL-IN ab_unmap.T2 IN FRAME Web-Frame
   ALIGN-L EXP-LABEL EXP-FORMAT EXP-HELP                                */
/* _RUN-TIME-ATTRIBUTES-END */
&ANALYZE-RESUME

 



/* ************************  Control Triggers  ************************ */

&Scoped-define SELF-NAME ab_unmap.bouton1
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.bouton1 w-html WEB.output
PROCEDURE ab_unmap.bouton1.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  DO WITH FRAME {&FRAME-NAME}:
     FIND erreur WHERE erreur.noerr = 100073
                   AND erreur.lang  = a-lang NO-LOCK NO-ERROR.
     {&out} "<input type=~"submit~" value=~"" erreur.libel
            "~" name=~"B1~" style=~"font-family: Arial; font-size: -4pt~">" SKIP.
  END.
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.Err_pwd
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.Err_pwd w-html WEB.output
PROCEDURE ab_unmap.Err_pwd.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  FIND erreur WHERE erreur.noerr = 101039
                AND erreur.lang  = a-lang NO-LOCK NO-ERROR.

  {&out} erreur.libel. 
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.err_pwda
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.err_pwda w-html WEB.output
PROCEDURE ab_unmap.err_pwda.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  IF flag-post <> 0 THEN DO:
      FIND erreur WHERE erreur.noerr = flag-post
                    AND erreur.lang  = a-lang NO-LOCK NO-ERROR.
      {&out} erreur.libel. 
  END.
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.lab-cli
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.lab-cli w-html WEB.output
PROCEDURE ab_unmap.lab-cli.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  DO WITH FRAME {&FRAME-NAME}:
     FIND erreur WHERE erreur.noerr = 101056
                   AND erreur.lang  = a-lang NO-LOCK NO-ERROR.
     {&out} erreur.libel. 
  END.
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.label1
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.label1 w-html web.output
PROCEDURE ab_unmap.label1.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  FIND erreur WHERE erreur.noerr = 101035
                AND erreur.lang  = a-lang NO-LOCK NO-ERROR.
  {&out} erreur.libel. 
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.label2
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.label2 w-html web.output
PROCEDURE ab_unmap.label2.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  FIND erreur WHERE erreur.noerr = 101036
                AND erreur.lang  = a-lang NO-LOCK NO-ERROR.

  {&out} erreur.libel. 
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.label3
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.label3 w-html web.output
PROCEDURE ab_unmap.label3.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  FIND erreur WHERE erreur.noerr = 101037
                AND erreur.lang  = a-lang NO-LOCK NO-ERROR.

  {&out} erreur.libel. 
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&Scoped-define SELF-NAME ab_unmap.label4
&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL ab_unmap.label4 w-html WEB.output
PROCEDURE ab_unmap.label4.output .
/*------------------------------------------------------------------------------
  Purpose:     Output the value of the field to the WEB stream
               in place of the HTML field definition.
  Parameters:  p-field-defn
  Notes:       
------------------------------------------------------------------------------*/
  DEFINE INPUT PARAMETER p-field-defn AS CHARACTER NO-UNDO.
  
  FIND erreur WHERE erreur.noerr = 101038
                AND erreur.lang  = a-lang NO-LOCK NO-ERROR.

  {&out} erreur.libel. 
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


&UNDEFINE SELF-NAME

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK w-html 


/* ************************  Main Code Block  ************************* */

/* Standard Main Block that runs adm-create-objects, initializeObject 
 * and process-web-request.
 * The bulk of the web processing is in the Procedure process-web-request
 * elsewhere in this Web object.
 */
{src/web2/template/hmapmain.i}

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME


/* **********************  Internal Procedures  *********************** */

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-create-objects w-html  _ADM-CREATE-OBJECTS
PROCEDURE adm-create-objects :
/*------------------------------------------------------------------------------
  Purpose:     Create handles for all SmartObjects used in this procedure.
               After SmartObjects are initialized, then SmartLinks are added.
  Parameters:  <none>
------------------------------------------------------------------------------*/

END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE htmOffsets w-html  _WEB-HTM-OFFSETS
PROCEDURE htmOffsets :
/*------------------------------------------------------------------------------
  Purpose:     Runs procedure to associate each HTML field with its
               corresponding widget name and handle.
  Parameters:  
  Notes:       
------------------------------------------------------------------------------*/
  RUN readOffsets ("{&WEB-FILE}":U).
  RUN htmAssociate
    ("bouton1":U,"ab_unmap.bouton1":U,ab_unmap.bouton1:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("Err_pwd":U,"ab_unmap.Err_pwd":U,ab_unmap.Err_pwd:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("err_pwda":U,"ab_unmap.err_pwda":U,ab_unmap.err_pwda:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("lab-cli":U,"ab_unmap.lab-cli":U,ab_unmap.lab-cli:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("label1":U,"ab_unmap.label1":U,ab_unmap.label1:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("label2":U,"ab_unmap.label2":U,ab_unmap.label2:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("label3":U,"ab_unmap.label3":U,ab_unmap.label3:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("label4":U,"ab_unmap.label4":U,ab_unmap.label4:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("lang":U,"ab_unmap.alang":U,ab_unmap.alang:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("login":U,"ab_unmap.login":U,ab_unmap.login:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("T0":U,"ab_unmap.T0":U,ab_unmap.T0:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("T1":U,"ab_unmap.T1":U,ab_unmap.T1:HANDLE IN FRAME {&FRAME-NAME}).
  RUN htmAssociate
    ("T2":U,"ab_unmap.T2":U,ab_unmap.T2:HANDLE IN FRAME {&FRAME-NAME}).
END PROCEDURE.
/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE outputHeader w-html 
PROCEDURE outputHeader :
/*------------------------------------------------------------------------
  Purpose:     Output the MIME header, and any "cookie" information needed 
               by this procedure.  
  Parameters:  <none>
  Notes:       In the event that this Web object is state-aware, this is 
               a good place to set the WebState and WebTimeout attributes.
------------------------------------------------------------------------*/

  /* To make this a state-aware Web object, pass in the timeout period
   * (in minutes) before running outputContentType.  If you supply a 
   * timeout period greater than 0, the Web object becomes state-aware 
   * and the following happens:
   *
   *   - 4GL variables webState and webTimeout are set
   *   - a cookie is created for the broker to id the client on the return trip
   *   - a cookie is created to id the correct procedure on the return trip
   *
   * If you supply a timeout period less than 1, the following happens:
   *
   *   - 4GL variables webState and webTimeout are set to an empty string
   *   - a cookie is killed for the broker to id the client on the return trip
   *   - a cookie is killed to id the correct procedure on the return trip
   *
   * For example, set the timeout period to 5 minutes.
   *
   *   setWebState (5.0).
   */
    
  /* Output additional cookie information here before running outputContentType.
   *   For more information about the Netscape Cookie Specification, see
   *   http://home.netscape.com/newsref/std/cookie_spec.html  
   *   
   *   Name         - name of the cookie
   *   Value        - value of the cookie
   *   Expires date - Date to expire (optional). See TODAY function.
   *   Expires time - Time to expire (optional). See TIME function.
   *   Path         - Override default URL path (optional)
   *   Domain       - Override default domain (optional)
   *   Secure       - "secure" or unknown (optional)
   * 
   *   The following example sets custNum=23 and expires tomorrow at (about)
   *   the same time but only for secure (https) connections.
   *      
   *   RUN SetCookie IN web-utilities-hdl 
   *     ("custNum":U, "23":U, TODAY + 1, TIME, ?, ?, "secure":U).
   */ 
  output-content-type ("text/html":U).
  
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME

&ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE process-web-request w-html 
PROCEDURE process-web-request :
/*------------------------------------------------------------------------
  Purpose:     Process the web request.
  Notes:       
------------------------------------------------------------------------*/
     
  /* STEP 0 -
   * Output the MIME header and set up the object as state-less or state-aware. 
   * This is required if any HTML is to be returned to the browser. 
   *
   * NOTE: Move 'RUN outputHeader.' to the GET section below if you are going
   * to simulate another Web request by running a Web Object from this
   * procedure.  Running outputHeader precludes setting any additional cookie
   * information.
   */ 
  
  RUN outputHeader.
  
  a-lang = INTEGER(get-field("lang")).
  IF a-lang = 0 THEN a-lang = 2.

  /* Describe whether to receive FORM input for all the fields.  For example,
   * check particular input fields (using GetField in web-utilities-hdl). 
   * Here we look at REQUEST_METHOD. 
   */
  IF REQUEST_METHOD = "POST":U THEN DO:
    /* STEP 1 -
     * Copy HTML input field values to the Progress form buffer. */
    RUN inputFields.
    
    /* STEP 2 -
     * Open the database or SDO query and and fetch the first record. */ 
    RUN findRecords.
    
    /* STEP 3 -    
     * AssignFields will save the data in the frame.
     * (it automatically upgrades the lock to exclusive while doing the update)
     * 
     *  If a new record needs to be created set AddMode to true before 
        running assignFields.  
     *     setAddMode(TRUE).   
     * RUN assignFields. */
    
    /* STEP 4 -
     * Decide what HTML to return to the user. Choose STEP 4.1 to simulate
     * another Web request -OR- STEP 4.2 to return the original form (the
     * default action).
     *
     * STEP 4.1 -
     * To simulate another Web request, change the REQUEST_METHOD to GET
     * and RUN the Web object here.  For example,
     *
     *  ASSIGN REQUEST_METHOD = "GET":U.
     *  RUN run-web-object IN web-utilities-hdl ("myobject.w":U).
     */
     
    /* STEP 4.2 -
     * To return the form again, set data values, display them, and output 
     * them to the WEB stream.  
     *
     * STEP 4.2a -
     * Set any values that need to be set, then display them. */


    ASSIGN buf-noadr = INTEGER(get-field("login")) NO-ERROR.
           buf-csmt  = 0.


    FIND adra WHERE adra.nosoc = 1
                AND adra.noadr = buf-noadr
                AND adra.csmt  = buf-csmt NO-ERROR NO-WAIT.

    IF AVAILABLE adra AND get-field("T0") = adra.pwdweb THEN DO:
       adra.pwdweb = get-field("T1").
       buf-suiv = "modpwdok.w?lang=" + STRING(a-lang).
    END.
    ELSE flag-post = IF AVAILABLE adra THEN 101040 ELSE 101041.
    
    IF buf-suiv <> "" THEN DO:
       ASSIGN REQUEST_METHOD = "GET":U.
       RUN run-web-object IN web-utilities-hdl (buf-suiv).
       RETURN.
    END.

    RUN displayFields.
   
    /* STEP 4.2b -
     * Enable objects that should be enabled. */
    RUN enableFields.

/* STEP 4.2c -
     * OUTPUT the Progress form buffer to the WEB stream. */
    RUN outputFields.

  END. /* Form has been submitted. */
 
  /* REQUEST-METHOD = GET */ 
  ELSE DO:
    /* This is the first time that the form has been called. Just return the
     * form.  Move 'RUN outputHeader.' here if you are going to simulate
     * another Web request. */ 

/*     RUN outputHeader.  */

    /* STEP 1 -
     * Open the database or SDO query and and fetch the first record. */ 
    RUN findRecords.
    
    /* Return the form again. Set data values, display them, and output them
     * to the WEB stream.  
     *
     * STEP 2a -
     * Set any values that need to be set, then display them. */
    RUN displayFields.

    /* STEP 2b -
     * Enable objects that should be enabled. */
    RUN enableFields.

    alang:SCREEN-VALUE IN FRAME {&FRAME-NAME} = STRING(a-lang).

    /* STEP 2c -
     * OUTPUT the Progress from buffer to the WEB stream. */
    RUN outputFields.
  END. 
  
  /* Show error messages. */
  IF AnyMessage() THEN 
  DO:
     /* ShowDataMessage may return a Progress column name. This means you
      * can use the function as a parameter to HTMLSetFocus instead of 
      * calling it directly.  The first parameter is the form name.   
      *
      * HTMLSetFocus("document.DetailForm",ShowDataMessages()). */
     ShowDataMessages().
  END.
 
END PROCEDURE.

/* _UIB-CODE-BLOCK-END */
&ANALYZE-RESUME

